package com.example.config;

import com.example.service.ProviderFeign;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class ProviderClientFallback implements FallbackFactory {
    @Override
    public Object create(Throwable cause) {
        return new ProviderFeign() {
            @Override
            public String teachers() {
                return "teacher方法降级";
            }
        };
    }
}
